/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entidad;

import java.util.ArrayList;
import java.util.List;
import javax.persistence.*;


/**
 *
 * @author HERX
 */
@Entity
@DiscriminatorValue("DIRECTOR")
public class Director extends Person  {
    
    
    //@OneToOne(mappedBy="director")
    @OneToOne
    private Movie movie;

    public void setMovie(Movie movie) {
        this.movie = movie;
    }

    public Movie getMovie() {
        return movie;
    }
    
    

 
    public void addMovie(Movie movie) {
       /*if (this.movies == null){
           this.movies= new ArrayList<Movie>();
       }
        this.movies.add(movie);*/
        this.movie=movie;
    }
}
